package de.farbstreich.tozen2.common;

import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;

import javax.imageio.ImageIO;

public class Tools {
	public static BufferedImage loadImage(String name) throws IOException {
		return ImageIO.read(ClassLoader
				.getSystemResource("de/farbstreich/tozen2/images/" + name));
	}

	public static URL getImageURL(String name) {
		return ClassLoader.getSystemResource("de/farbstreich/tozen2/images/"
				+ name);
	}
	
	public static URL getSoundURL(String name) {
		return ClassLoader.getSystemResource("de/farbstreich/tozen2/sounds/"
				+ name);
	}
}
